﻿
using MyFloridaHouse.libSvOpenDistricts.enumerations;
namespace MyFloridaHouse.libSvOpenDistricts.ViewModel
{
    public partial class ViewModelBase
    {
        // controls whether or not the Bing Satellite view is shown
        private string _bingShowMapMode;
        public string bingShowMapMode
        {
            get { return _bingShowMapMode; }
            set { if (_bingShowMapMode != value) { _bingShowMapMode = value; NotifyPropertyChanged("bingShowMapMode"); } }
        }


        // controls the interface mode, i.e. explore, build with click, etc.
        private enumMapMode _mapMode = enumMapMode.Explore;
        public enumMapMode mapMode
        {
            get { return _mapMode; }
            set { if (_mapMode != value) 
                    { 
                        _mapMode = value;
                        if (_mapMode != enumMapMode.Click) isEasyClickMode = false;
                        NotifyPropertyChanged("mapMode"); 
                    } 
                }
        }

        private bool _isEasyClickMode;
        public bool isEasyClickMode
        {
            get { return _isEasyClickMode; }
            set { if (_isEasyClickMode != value) { _isEasyClickMode = value; NotifyPropertyChanged("isEasyClickMode"); } }
        }


        public void attemptToggleEasyClickMode()
        {
            if (mapMode == enumMapMode.Click)
                isEasyClickMode = !isEasyClickMode;
            else
                isEasyClickMode = false;

        }

        private bool _isFreezeData;
        public bool isFreezeData
        {
            get { return _isFreezeData; }
            set
            {
                if (_isFreezeData != value)
                {
                    if (!isDialogOpen)
                    {
                        _isFreezeData = value;
                    }
                    NotifyPropertyChanged("isFreezeData");
                }
            }
        }

        public void attemptToggleFreezeDataMode()
        {
                isFreezeData = !isFreezeData;
        }
    }
}
